import { createApp } from 'vue'
import './style/index.css'
import App from './App.vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import Router from './router'
import directives from './directive'
import { range } from '@/utils/index'
import { createPinia } from 'pinia'

window.range = range

const app = createApp(App)

// 将所有的指令文件都配置到 app 中
Object.keys(directives).forEach((item) => {
    // app.directive(`${item[0].toUpperCase()}${item.slice(1)}`, directives[item])
    app.directive(item, directives[item])
})

app.use(Router)
app.use(createPinia())
app.use(Antd)

app.mount('#app')
